<style>
  .animation {
    position: relative;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    line-height: 2;
  }

  .animation::before {
    content: attr(data-content);
    position: absolute;
    top: 0;
    left: 0;
    color: transparent;
    white-space: nowrap;
    text-decoration-line: underline;
    text-decoration-style: wavy;
    text-decoration-color: #000;
    z-index: -1;
  }

  .animation:hover::before {
    animation: move 3s infinite linear;
  }

  @keyframes move {
    100% {
      transform: translate(-100px, 0);
    }
  }
</style>


<p class="animation" data-content="Lorem ibsum dolor Lorem ibsum dolor">Lorem ibsum dolor</p>